import http from '../utils/http.js'

/**
 * @description: 获取媒体记录列表
 * @return {*}
 */
export async function getMediaListApi() {
    return http.get('/api/media/list');
}

/**
 * @description: 删除媒体记录
 * @param {number} id - 媒体记录ID
 * @return {*}
 */
export async function deleteMediaApi(id) {
    return http.delete(`/api/media/delete/${id}`);
}

/**
 * @description: 保存媒体记录
 * @param {string} taskId - 任务ID
 * @param {string} mediaUrl - 媒体URL
 * @return {*}
 */
export async function saveMediaApi(taskId, mediaUrl) {
    return http.post('/api/media/saveMedia', {}, {
        params: {
            taskId: taskId,
            mediaUrl: mediaUrl
        }
    });
}